<?php
namespace App\Crontab;

use Hyperf\Contract\StdoutLoggerInterface;
use Hyperf\Crontab\Annotation\Crontab;
use Hyperf\Di\Annotation\Inject;

use App\Service\TestService;
use App\Utils\CustomUtils;

/**
 * @Crontab(name="TestCronTask", rule="*\/6 * * * * *", callback="execute", memo="这是一个定时的定时任务")
 */
class TestCronTask
{

    /**
     * @Inject()
     * @var \Hyperf\Contract\StdoutLoggerInterface
     */
    private $logger;

    /**
     * @Inject()
     * @var TestService
     */
    private $TestService;

    public function execute()
    {
        // $this->logger->info(date('Y-m-d H:i:s', time()));
        // CustomUtils::xzxDebug("enter test rate task");
        // $this->TestService->list();

    }
}
